<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Thymeleaf入门</title>
</head>
<body>
<table border="1">
    <h3>修改用户信息</h3>
    <hr>
    <form th:action="@{/ccc/update}" method="post">
        <input type="hidden" name="id" th:value="${user.id}"><br>
        用户名:<input type="text" name="name" th:value="${user.name}"><br>
        性别:<input type="radio" name="sex" th:value="1" th:if="${user.sex.equals('1')}" checked>男
        <input type="radio" name="sex" th:value="2" th:if="${user.sex.equals('2')}" checked>女<br>
        年龄:<input type="text" name="age" th:value="${user.age}"><br>
        地址：<input type="text" name="address" th:value="${user.address}"><br>
        生日：<input type="date" name="birthday" th:value="${#dates.format(user.birthday,'yyyy-MM-dd')}"><br>
        爱好：<input type="checkbox" name="hobby" th:value="学习" th:if="${user.hobby.contains('学习')}" checked>学习
        <input type="checkbox" name="hobby" th:value="阅读" th:if="${user.hobby.contains('阅读')}" checked>阅读
        <input type="checkbox" name="hobby" th:value="运动" th:if="${user.hobby.contains('运动')}" checked>运动<br>
        <input type="submit" th:value="提交">
        <input type="reset" th:value="重置">
    </form>
</table>
</body>
</html>